package com.pattern.creational_pattern.builder_pattern;

/**
 * @Description an abstract BUILDER in the pattern.
 * @Author Ping
 * @Date 2022/3/20 22:41
 **/
public abstract class MealBuilder {
    /**
     * a meal to be build
     */
    protected Meal meal ;

    public MealBuilder() {
        // one of ways for create a new meal
        this.meal = new Meal();
    }

    /**
     * two methods for building parts for {@code the meal}.
     */
    public abstract void buildFood() ;
    public abstract void buildDrink() ;

    /**
     * and one method for getting the final meal.
     * @return
     */
    public Meal buildMeal() {
        return this.meal ;
    }
}
